  
var tableManage = function() {

	var _init = function() {

		var table = $('#table_order');
		var userId= $('#userId').val();
		var tableUnit = table.dataTable({
			"processing": true,
			// 开启服务器模式
			serverSide: true,
			"ajax": {
				url:posturl,
				data:{"type":'1',"userId":userId,"status":'2'}  //提现
			},
			"autoWidth": true,
			"columns": [
				{
					"data": "amount",//提现金额
					"render": function(data, type, row, meta) {
						if(data){
							return data/100
						}else{
							return "--"
						}
					}
				},
				{
					"data":"accountName"//提现账户
				
				},
				/*{
					"data":"account"//提现账号
				
				},*/
				{
					"data":"tradeNo"//交易单号
				
				},
				{
					"data":"tradeDate",//交易时间,
					"render":function(data, type, row, meta) {
						if(data){
							return moment(data).format('YYYY-MM-DD HH:mm');
						}else{
							return "--";
						}
					}
				},
				{
					"data": "createDate",//申请日期
					"render":function(data, type, row, meta) {
						return moment(data).format('YYYY-MM-DD HH:mm');
					}
				},
			],
			"language": {
				url: '/public/static/admin/pages/Chinese.json'
			},
			"pageLength": 10,
			"order": [
				[4, "desc"]
			],
			/*"columnDefs": [{
				"orderable": false,
				"targets": [0,2,3,1,]
			}],*/
            "dom": "<'row'<'.col-md-6 col-sm-12'><'col-md-6 col-sm-12'>r>" +
				"<t>" +
				"<'table_b relative'<'col-md-5'i><'col-md-7'>lp>",
            "fnInitComplete": function() {},
		});
	};

	return {
		init: function() {
			_init();
		}
	};

}();

$(function() {
    tableManage.init();
});